package com.sunthy.mall.service.admin.goods;

import com.sunthy.mall.model.admin.bo.client.order.AskGoodsMsgBo;
import com.sunthy.mall.model.admin.bo.goods.AddGoodsBO;
import com.sunthy.mall.model.admin.bo.goods.GoodsDeleteSpecBo;
import com.sunthy.mall.model.admin.bo.goods.GoodsUpdateBo;
import com.sunthy.mall.model.admin.bo.goods.GoodsUpdateSpecBo;
import com.sunthy.mall.model.admin.bo.reply.ReplyBo;
import com.sunthy.mall.model.admin.pojo.goods.Type;
import com.sunthy.mall.model.admin.vo.goods.AllGoodsInfoVo;
import com.sunthy.mall.model.admin.vo.goods.AllGoodsVo;
import com.sunthy.mall.model.admin.vo.goods.AllTypeVo;
import com.sunthy.mall.model.admin.vo.reply.AllNoReplyByStateVo;
import com.sunthy.mall.model.admin.vo.reply.AllReplyByStateVo;
import com.sunthy.mall.model.admin.vo.client.goods.AllReplyForGoodsIdVo;
import com.sunthy.mall.model.admin.vo.client.goods.GoodsCommentVo;
import com.sunthy.mall.model.admin.vo.client.goods.GoodsInfoForUserVo;

import java.util.List;

public interface GoodsService {
    // 返回所有的type信息
    List<AllTypeVo> allTypes();
    // 返回指定的typeId的所有goods
    List<AllGoodsVo> allGoodsByTypeId(Integer typeId);
    // 添加type
    int addType(Type type);
    // 删除type 通过id
    int deleteTypeById(int typeId);
    // 添加goods
    void addGoods(AddGoodsBO addGoodsBO);
    // 删除商品
    int deleteGoodsById(int id);
    // 通过id回显goods
    AllGoodsInfoVo getGoodsInfoById(int id);
    // 修改goods
    int updateGoods(GoodsUpdateBo goodsUpdateBo);
    // 添加一个spec
    int addSpecBeforeAddGoods(GoodsUpdateSpecBo goodsUpdateSpecBo);
    // 删除spec
    int deleteSpec(GoodsDeleteSpecBo goodsDeleteSpecBo);

    /**
     * 封装所有未回复的reply
     * @return List<AllNoReplyByStateVo>
     */
    List<AllNoReplyByStateVo> getNoReplyMsg();

    /**
     * 封装所有已回复的reply
     * @return List<AllReplyByStateVo>
     */
    List<AllReplyByStateVo> getReplyMsg();

    int replyByAdmin(ReplyBo replyBo);

    List<AllReplyForGoodsIdVo> getGoodsMsgById(Integer id);

    /**
     * 获取商品评价
     * @param goodsId
     * @return  GoodsCommentVo
     */
    GoodsCommentVo getGoodsComment(Integer goodsId);

    /**
     * 前台商品信息回显
     * @param id goodsId
     * @return GoodsInfoForUserVo
     */
    GoodsInfoForUserVo getGoodsInfoForUserById(int id);

    /**
     * 根据商品名字模糊查询goods
     * @param keyword
     * @return  List<AllGoodsVo>
     */
    List<AllGoodsVo> getGoodsByName(String keyword);
    /**
     * 添加留言
     * @param askGoodsMsgBo
     * @return int
     */
    int addAskGoodsMsg(AskGoodsMsgBo askGoodsMsgBo);
}

